#include <stdio.h>
#include "Syscall.h"
#include "System.h"

/// <summary>
/// This IoControl function
/// sends an IOCTL directly to a specified
/// device, causing the corresponding device
/// to perform the specified operation.
/// </summary>
int IoControl(int handle, unsigned int command, void *data)
{
	int result = -1;
	if ((result = Syscall3(__NR_ioctl, handle, (int)command, (int)data)) == -1)
		return -1;
	return result;
}
